package se.statifyme.server.entities;

import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Entity;
import javax.persistence.MappedSuperclass;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;

import se.statifyme.server.declaration.ItemField;


@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
@Entity
@MappedSuperclass
public abstract class Record extends OwnedItem {

	@Basic(optional = false)
	@ItemField(displayName = "Date", optional = true)
	private Date date;
	
	public Record() {
		this.date = new Date();
	}
	
	public Date getDate() {
		return date;
	}
	
	public void setDate(Date date) {
		this.date = date;
	}
	
}
